<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="text/html;charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no cache"/>
    <meta http-equiv="Expires" content="0"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <script src="https://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="https://cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" type="text/css" href="../../css/fs.css" media="all"/>
    <script type="text/javascript" src="../../plugins/layui/layui.js"></script>
    <script type="text/javascript" src="../../plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../plugins/frame/js/fsDict.js?v=1.7.0"></script>
    <script type="text/javascript" src="../../plugins/frame/js/fs.js?v=1.7.0"></script>
    <script type="text/javascript" src="../../plugins/frame/js/frame.js?v=1.7.0"></script>
    <script type="text/javascript" src="../../scripts/basic.js"></script>
</head>
<body>
<div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space1">
            <div class="layui-col-md12">
                <div class="layui-form-queryTest">
                    <form class="layui-form" id="query_form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-mid">id：</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="tel" name="id" autocomplete="off" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-mid">名称：</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="text" name="name" autocomplete="off" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-mid">时间：</label>
                                <div class="layui-input-inline" style="">
                                    <input type="text" name="createDate" autocomplete="off" class="layui-input fsDate"
                                           dateRange="1" placeholder=" - "/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <button class="layui-btn" type="button" function="query"><i class="layui-icon">&#xe615;</i>查询
                                    </button>
                                </div>
                            </div>
                        </div>


                    </form>
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-row grid-demo">
                    <div class="layui-col-md12">
                        <button class="layui-btn" function="top" topUrl="schedule/job/add.html" topWidth="800px"
                                isMaximize="0" topHeight="420px" topTitle="新增任务">
                            <i class="layui-icon">&#xe654;</i>新增
                        </button>
                        <button class="layui-btn layui-btn-danger" function="submit" method="get" url="schedule/job/delete"
                                isMutiDml="1" isConfirm="1" confirmMsg="是否确定删除选中的数据？" inputs="jobId:">
                            <i class="layui-icon">&#xe640;</i>批量删除
                        </button>
                        <button class="layui-btn layui-btn-warm" function="submit" method="get" url="schedule/job/pause"
                                isMutiDml="1" isConfirm="1" confirmMsg="是否确定暂停选中的任务？" inputs="jobId:">
                            <i class="layui-icon">&#xe651;</i>批量暂停
                        </button>
                        <button class="layui-btn" function="submit" method="get" url="schedule/job/resume"
                                isMutiDml="1" isConfirm="1" confirmMsg="是否确定恢复选中的任务？" inputs="jobId:">
                            <i class="layui-icon">&#xe652;</i>批量恢复
                        </button>
                        <button class="layui-btn layui-btn-normal" function="submit" method="get" url="schedule/job/run"
                                isMutiDml="1" isConfirm="1" confirmMsg="是否确定立即执行选中的任务？" inputs="jobId:">
                            <i class="layui-icon">&#xe628;</i>批量执行
                        </button>
                        <button class="layui-btn" function="refresh">
                            <i class="layui-icon">&#x1002;</i>刷新
                        </button>
                    </div>
                    <div class="layui-col-md12">
                        <table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" isLoad="1" url="schedule/job/list"
                               isPage="1" sortType="1" pageSize="10" defaultForm="query_form" height="full-135"></table>

                        <div class="fsDatagridCols">
                            <p type="numbers" title="#"/>
                            <p checkbox="true"/>
                            <p field="jobId" title="任务ID" width="100" sort="true"/>
                            <p field="beanName" title="bean名称" width="150"/>
                            <p field="methodName" title="方法名称" width="100"/>
                            <p field="params" title="参数" width="200"/>
                            <p field="cronExpression" title="cronExpression" width="300"/>
                            <p field="status" title="状态" width="100" templet="#stateTpl"/>
                            <p field="remark" title="备注" width="200"/>
                            <p fixed="right" align="center" toolbar="#barDemo" title="操作" width="320"/>
                        </div>
                        <script type="text/html" id="stateTpl">
                            <input type="checkbox" name="status" lay-skin="switch" disabled lay-text="正常|暂停" {{
                                   d.status==
                                   0 ? 'checked' : '' }}>
                        </script>
                        <script type="text/html" id="barDemo">
                            <a class="layui-btn layui-btn-xs" lay-event="top" topUrl="schedule/job/edit.html"
                               topWidth="800px" topHeight="420px" topTitle="编辑任务" inputs="jobId:">编辑</a>
                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="schedule/job/delete"
                               isConfirm="1" method="get" confirmMsg="是否确定删除当前任务？" inputs="jobId:">删除</a>
                            <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="submit" url="schedule/job/pause"
                               isConfirm="1" method="get" confirmMsg="是否确定暂停当前任务？" inputs="jobId:">暂停</a>
                            <a class="layui-btn layui-btn-xs" lay-event="submit" url="schedule/job/resume"
                               isConfirm="1" method="get" confirmMsg="是否确定恢复当前任务？" inputs="jobId:">恢复</a>
                            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="submit" url="schedule/job/run"
                               isConfirm="1" method="get" confirmMsg="是否确定立即执行当前任务？" inputs="jobId:">立即执行</a>
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    layui.fsButton.test2 = function (elem, data, datagrid) {
        alert("测试自定义按钮2" + JSON.stringify(data));
    }
</script>
</body>
</html>
